home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1599 / 1276 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.8 KB

  1. From: Kay Roemer <roemer@informatik.uni-frankfurt.de>
  2. Posted-Date: Wed, 20 Apr 94 8:27:23 MESZ
  3. Received-Date: Wed, 20 Apr 94 08:27:24 +0200
  4. Message-Id: <9404200627.AA07875@hera.rbi.informatik.uni-frankfurt.de>
  5. Subject: Re: sending signals from xdd's 
  6. To: howard@harry.lloyd.com (Howard Chu)
  7. Date: Wed, 20 Apr 94 8:27:23 MESZ
  8. In-Reply-To: <m0ptPkd-000ERuC@lloyd.com>; from "Howard Chu" at Apr 19, 94 5:02 pm
  9. Mailer: Elm [revision: 70.85]
  10.  
  11.  
  12. Howard writes:
  13.  
  14. > Instead of requiring another thread, you could just install your own handler
  15. > in the vbl queue. Or perhaps we can add a queue internal to MiNT that's
  16. > processed at regular intervals. In either case you need to be able to call
  17. > post_sig in order for it to be useful. My patch to make Fselect work on the
  18. > standard BIOS serial ports just checks each port's buffers during vbl
  19. > processing and then calls wakeup or wakeselect as required. I suppose I could
  20. > also have implemented SIGIO there at the same time...
  21. > I guess a standard queue would be nice, have every driver that uses it set up
  22. > 2 flags (e.g. read_ready and write_ready) that cause appropriate wakeup calls
  23. > to be made. We could even implement the Exceptional conditions for select.
  24.  
  25. When addroottimeout() is included into Mint, such a queue need not be
  26. implemented, because it is then already there -- the timeout delta list.
  27. All what is needed to do to wake processes on input and send signals when
  28. post_sig() is in struct kerinfo, is the following:
  29.  
  30. static int pending = 0;
  31.  
  32. void
  33. wakeme (long proc)
  34. {
  35.     pending = 0;
  36.     wakeselect (`the process');
  37.     wake (IO_Q, (long)`wait cond');
  38.     kerinfo->post_sig (...);
  39. }
  40.  
  41. and to do the following at interrupt time when input arrives (probably
  42. at spl7):
  43.  
  44. if (!pending) {
  45.     pending = 1;
  46.     addroottimeout (0, wakeme, 1);
  47. }
  48.  
  49. Kay.
  50.